package cc.mrbird.common.utils;

/**
 * 业务枚举
 * @Date Mar 26, 2021
 * @author miaojizhong
 */
public class Enumerations {

	// 河南省固定编码
	public static final String HENANCODE = "411000000000000001950388";

	// 是否状态
	public enum IsState {
		是(1), 否(0);
		Integer state;

		private IsState(Integer state) {
			this.state = state;
		}

		public Integer getState() {
			return state;
		}

		public static IsState getIsState(Integer state) {
			switch (state) {
			case 1:
				return 是;
			case 0:
				return 否;
			default:
				return null;
			}
		}
	}

	// 模块名称
	public enum ModelName {
		专家带班("expertDuty"), 业务发展("businessMetrics"), 核心指标("coreMetrics"), 舆情重保("publicopinion"), 故障处置("faultOrder");
		private String name;

		private ModelName(String name) {
			this.name = name;
		}

		public String getName() {
			return name;
		}

		public static ModelName getModelName(String name) {
			switch (name) {
			case "expertDuty":
				return 专家带班;
			case "businessMetrics":
				return 业务发展;
			case "coreMetrics":
				return 核心指标;
			case "publicopinion":
				return 舆情重保;
			case "faultOrder":
				return 故障处置;
			default:
				return null;
			}
		}
	}

	// 指标类型
	public enum IndexType {
		序号1("01"), 序号2("02"), 序号3("03"), 序号4("04"), 序号5("05"), 序号6("06"), 序号7("07"), 序号8("08"), 序号9("09"), 序号10("10");
		private String type;

		private IndexType(String type) {
			this.type = type;
		}

		public String getType() {
			return type;
		}

		public static IndexType IndexType(String type) {
			switch (type) {
			case "01":
				return 序号1;
			case "02":
				return 序号2;
			case "03":
				return 序号3;
			case "04":
				return 序号4;
			case "05":
				return 序号5;
			case "06":
				return 序号6;
			case "07":
				return 序号7;
			case "08":
				return 序号8;
			case "09":
				return 序号9;
			case "10":
				return 序号10;
			default:
				return null;
			}
		}
	}

}
